home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / squeeze.z / squeeze
Text File  |  1998-10-30  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSQQQQUUUUEEEEEEEEZZZZEEEE((((1111))))                                                          SSSSQQQQUUUUEEEEEEEEZZZZEEEE((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      squeeze - squeeze memory from the system
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ssssqqqquuuueeeeeeeezzzzeeee [flag] amount
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _s_q_u_e_e_z_e will allocate a region of its virtual memory of a size given by
  16.      its arguments, and lock that virtual memory down into real memory, thus
  17.      making it unavailable to other processes.  It can only be used by the
  18.      superuser.
  19.  
  20.      The amount of memory locked is specified as an integer argument, in units
  21.      given by the flag argument.  By default it is in megabytes (-m flag).  A
  22.      flag of -p, implies that the amount is in pages; a flag of -k implies
  23.      that the amount in kilobytes; and a flag of -% implies a percentage of
  24.      the installed memory.
  25.  
  26.      Once the memory is locked down, _s_q_u_e_e_z_e prints a message on stdout saying
  27.      how much is locked, and sleeps indefinitely.  It can be interrupted by
  28.      SIGINT or SIGTERM, at which time it frees up the memory and exits.  The
  29.      user should wait until after this message is printed before doing any
  30.      experiments.
  31.  
  32. UUUUSSSSAAAAGGGGEEEE
  33.      _s_q_u_e_e_z_e can be used to determine the approximate working set of a
  34.      program.  To do so, use a machine which has enough physical memory to
  35.      allow your target application to run without any paging (other than
  36.      startup).  This can be determined by using the command _s_s_u_s_a_g_e to spawn
  37.      your application.  When the application exits, its resource usage is
  38.      printed; the value labeled majf gives the number of major page faults,
  39.      that is the number of faults that required a physical read to satisfy.
  40.      When run on a machine with a large amount of physical memory, this value
  41.      is the number of faults needed to start the program, which is the minimum
  42.      number for any run.
  43.  
  44.      Then run _s_q_u_e_e_z_e to lock down varying amounts of memory, and rerun the
  45.      program.  The major-fault number will remain low at first, but as you
  46.      squeeze out more and more memory, it will rise.  The amount of physical
  47.      memory in the system minus the amount of memory squeezed at point at
  48.      which your application begins to page-fault tells you the combined
  49.      working set of your program, the kernel, and all other applications you
  50.      normally have running.  If you have previously done this on a program
  51.      whose paging behavior is well understood, you can determine the working
  52.      set of the kernel and your normal environment, and by subtraction, the
  53.      working set of the application you are studying.
  54.  
  55.      One program that can be used for this purpose is thrash(1).  It allocates
  56.      a large block of memory, and then sequentially accesses each page in the
  57.      block.  For all practical purposes, the working set of this program is
  58.      the size of the memory allocated.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSQQQQUUUUEEEEEEEEZZZZEEEE((((1111))))                                                          SSSSQQQQUUUUEEEEEEEEZZZZEEEE((((1111))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      ssusage(1), thrash(1)
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.